<template>
	<Form label-position="top">
        <FormItem label="页面标题">
            <Input v-model="value.title"></Input>
        </FormItem>
        <FormItem label="页面背景">
            <RadioGroup v-model="value.bgType">
		        <Radio :label="0">颜色</Radio>
		        <Radio :label="1">图片</Radio>
		    </RadioGroup>
        </FormItem>
        <div v-show="value.bgType == 0">
        	<FormItem label="背景颜色">
	            <ColorPicker v-model="value.bgcolor" alpha></ColorPicker>
	        </FormItem>
        </div>
        <div v-show="value.bgType == 1">
        	<FormItem label="背景图片">
	        	<div style="display: inline-block; width: 54px; height: 54px; border: 1px dashed #e0e1e4; border-radius: 4px; vertical-align: middle; overflow: hidden;">
	        		<ImageUpload v-model="value.img" hide-label></ImageUpload>
	        	</div>
	        	<span style="margin-left: 10px; color: #999; vertical-align: middle;">请上传背景图片，图片格式为：JPG、PNG、GIF。</span>
	        </FormItem>
	        <FormItem label="平铺方式">
	            <RadioGroup v-model="value.repeat">
			        <Radio :label="0">左右重复</Radio>
			        <Radio :label="1">上下重复</Radio>
			        <Radio :label="2">各方向重复</Radio>
			        <Radio :label="3">不平铺</Radio>
			    </RadioGroup>
	        </FormItem>
	        <FormItem label="对齐方式">
	            <RadioGroup v-model="value.align">
			        <Radio :label="0">左对齐</Radio>
			        <Radio :label="1">居中</Radio>
			        <Radio :label="2">右对齐</Radio>
			    </RadioGroup>
	        </FormItem>
        </div>
   	</Form>
</template>

<script>
import ImageUpload from '@/views/diy/components/ImageUpload.vue';
export default {
	name: 'pageSetConfig',
	components: {
		ImageUpload
	},
	props: {
		value: {
			type: Object,
			default: function() {
				return {};
			}
		}
	},
	data() {
		return {
			
		}
	}
}
</script>

<style>
</style>